<?

class Admin_Visitors extends MY_Controller {

    function Admin_Visitors() {

        parent::MY_Controller(TRUE);

        if ($this->input->post('option')) {

            if ($this->input->post('option') == 'default') {

                redirect('admin_visitors/detail/date/' . $this->uri_assoc['date']);

            }

            else {

                redirect('admin_visitors/' . $this->input->post('option') . '/date/' . $this->uri_assoc['date']);

            }

        }

    }

    function index() {

        $this->mdl_sessions->set_last_index();

        $this->load->view('admin/visitors_index');

    }

    function detail() {

        $this->mdl_sessions->set_last_index();

        $this->load->view('admin/visitors_detail_index');

    }

    function by_referer() {

        $this->mdl_sessions->set_last_index();

        $this->load->view('admin/visitors_referer_index');

    }

}

?>